<template>
	<div class="header drag">
		<span v-if="title">{{ title }}</span>
		<WinBtn v-bind="$attrs"></WinBtn>
	</div>
</template>

<script setup lang="ts">
defineProps({
	title: { type: String, default: '' }
})
import WinBtn from './WinBtn.vue'
import { onMounted } from 'vue'
const newWindowData = ref({})

onMounted(() => {
	window.ipcRenderer.on('newWindowData', (_e, data) => {
		console.log('changeTitle', data)
		newWindowData.value = { ...data };
	})
})

</script>

<style lang="scss" scoped>
.header {
	height: 40px;
	padding: 0 10px;
	display: flex;
	align-items: center;
}
</style>
